DROP TABLE IF EXISTS jms_dws.dws_network_entry_port_monitor_sum_dt;
CREATE EXTERNAL TABLE jms_dws.dws_network_entry_port_monitor_sum_dt
(
    send_date                       DATE COMMENT '发件日期',
    shift                           INT COMMENT '散货班次',
    send_network_code               STRING COMMENT '发件扫描网点编码',
    next_network_code               STRING COMMENT '下一站网点编码',
    next_financial_center_code      STRING COMMENT '下一站网点所属代理区编码',
    next_parent_network_code        STRING COMMENT '下一站网点所属加盟商编码',
    send_network_name               STRING COMMENT '发件扫描网点名称',
    next_network_name               STRING COMMENT '下一站网点名称',
    next_financial_center_desc      STRING COMMENT '下一站网点所属代理区名称',
    next_parent_network_name        STRING COMMENT '下一站网点所属加盟商名称',
    send_total                      INT COMMENT '发件总量',
    planned_departure_time          STRING COMMENT '规划接件时间',
    departure_punctuality_total     INT COMMENT '接件准时量',
    departure_leaky_scanning_total  INT COMMENT '接件漏扫量',
    departure_not_punctuality_total INT COMMENT '接件操作不及时量',
    planned_arrival_time            STRING COMMENT '规划到达时间',
    arrival_is_punctuality_total    INT COMMENT '到达准时量',
    arrival_leaky_scanning_total    INT COMMENT '到达漏扫量',
    arrival_not_punctuality_total   INT COMMENT '到达操作不及时量',
    planned_deliver_time            STRING COMMENT '规划出仓时间',
    deliver_is_punctuality_total    INT COMMENT '出仓准时量',
    deliver_leaky_scanning_total    INT COMMENT '出仓漏扫量',
    deliver_not_punctuality_total   INT COMMENT '出仓操作不及时量'
)
    comment '网点进港时效监控汇总数据'
    partitioned by (dt string comment '时间分区')
    stored as parquet
    location '/dw/hive/jms_dws.db/external/dws_network_entry_port_monitor_sum_dt'
    tblproperties (
        'discover.partitions' = 'false',
        'parquet.column.index.access' = 'true'
        );
MSCK REPAIR TABLE jms_dws.dws_network_entry_port_monitor_sum_dt;